package com.levy.contronller.javase.designModel.observer.news;

import java.util.Observable;

/**
 * 博主 被观察者
 * Created by levy on 2018/8/7.
 */
public class BlogUser extends Observable {

    public void publishBlog(String title,String content){

        Article article = new Article();
        article.setTitle(title);
        article.setContent(content);


        System.out.println("发表文章-----"+title+":"+content);
        this.setChanged();
        this.notifyObservers(article);
    }
}
